package org.csmzxy.class2334;
abstract class Department1{
    String name;
    int numOfMembers;
    public abstract void work();
}
class TechDepartment extends Department1 {
    public TechDepartment(String name, int numOfMembers) {
        super.name = name;
        super.numOfMembers = numOfMembers;
    }
    @Override
    public void work() {
        System.out.println(super.name+"负责技术研发、软件开发和系统维护等，"+"部门有"+super.numOfMembers+"人。");
    }
}
class SaleDepartment extends Department1{
    public SaleDepartment(String name, int numOfMembers) {
        super.name = name;
        super.numOfMembers = numOfMembers;
    }
    @Override
    public void work() {
        System.out.println(super.name+"负责销售业务拓展、市场营销策划等，"+"部门有"+super.numOfMembers+"人。");
    }
}
public class Example09 {
    public static void main(String[] args){
        TechDepartment t = new TechDepartment("技术部门",50);
        t.work();
        SaleDepartment s =new SaleDepartment("销售部门",30);
        s.work();
    }
}
